{{if .CurrentUser}}
    {{if eq .User.Id .CurrentUser.Id}}
        <div class="widget">
            <div class="content">
                <a class="button is-primary" href="{{baseUrl}}/topic/create"><i
                            class="iconfont icon-topic"></i>&nbsp;<strong>发表主题</strong></a>
                <a class="button is-success" href="{{baseUrl}}/article/create"><i
                            class="iconfont icon-publish"></i>&nbsp;<strong>发表文章</strong></a>
            </div>
        </div>
    {{end}}
{{end}}

<div class="widget">
    <div class="header">
        个人资料
    </div>
    <div class="content">
        <img src="{{.User.Avatar}}"/>
        <div>
            <span><i class="iconfont icon-username"></i><a
                        href="{{baseUrl}}/user/{{.User.Id}}">&nbsp;{{.User.Nickname}}</a></span>
        </div>
        {{if .CurrentUser}}
            {{if eq .User.Id .CurrentUser.Id}}
                <div>
                    <span><i class="iconfont icon-edit"></i><a href="{{baseUrl}}/user/edit/{{.User.Id}}">&nbsp;编辑资料</a></span>
                </div>
            {{end}}
        {{end}}
        {{if .User.Description}}
            <div style="margin-top: 10px;">
                <p>{{.User.Description}}</p>
            </div>
        {{end}}
    </div>
</div>
{{/*
{{if eq .User.Type 1}}
    <div class="widget">
        <div class="header">关注公众号</div>
        <div class="content">
            <img src="https://open.weixin.qq.com/qr/code?username={{.User.Username}}"/>
        </div>
    </div>
{{end}}
*/}}
